package 作业;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: lenovo
 * Date: 2022-10-06
 * Time: 19:57
 */
public class demo3 {
    public static void main(String[] args) {
        for (int i = 0; i < 10; i++) {
            Thread t1 = new Thread(){
                @Override
                public void run() {
                    System.out.print("A");
                }
            };
            t1.start();
            Thread t2 = new Thread(){
                @Override
                public void run() {
                    try {
                        Thread.sleep(10);
                    } catch (InterruptedException e) {
                        e.printStackTrace();
                    }
                    System.out.print("B");
                }
            };
            t2.start();
            Thread t3 = new Thread(){
                @Override
                public void run() {
                    try {
                        Thread.sleep(20);
                    } catch (InterruptedException e) {
                        e.printStackTrace();
                    }
                    System.out.println("C");
                }
            };
            t3.start();
        }

    }
}
